package com.more.offer.designpatterns.adapter.adapter1;

/**
 * @author pinoc
 * @date 2021/10/27
 * @description 圆孔类
 */
public class RoundHole {

	private double radius;

	public RoundHole(double radius) {
		this.radius = radius;
	}

	public double getRadius() {
		return radius;
	}

	public void setRadius(double radius) {
		this.radius = radius;
	}

	/**
	 * 钉子和孔是否合适
	 * @return
	 */
	public boolean fits(RoundPeg peg) {
		if(this.getRadius() >= peg.getRadius()) {
			return true;
		}
		return false;
	}
}
